home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
comm
/
www
/
IV24WebCam.lha
/
webcam.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1997-08-22
|
3KB
|
101 lines
/*
ARexx GVP IV24 Web Cam
By Casey Halverson (cmdo@gte.net)
Copyright 1997, All Rights Reserved
Webcam software which makes use of the GVP IV24 video board/genlock hardware
You can find me on IRC under the nick Commando on Undernet - #Virii,
EFNet - #WoT, and AmigaNet/ANet - #Amiga (whiterose.net 6667)
*/
/* Configuration Settings */
/* All directories need a trailing '/' */
signal on BREAK_C
location="ram:webcam/" /* Location of the web-cam directory */
temp="ram:" /* Temp image capture directory */
index="internet:www/webcam.html" /* Webcam HTML document */
log=1 /* Display log information */
time=120 /* Time delay between captures */
imagecon="work:gfxcon" /* Image Converter */
imagearg="FORMAT gif SIZE 320 200 COLORS 256" /* Image Converter Arguments */
progname="webcam.rexx" /* If you ever change the program
name for some reason, make sure
you change this as well. More
about this on the next comment */
/*
This is some nasty handling, but setting the stack in address command doesn't
work out at all. This will set the stack, then start the program with an
argument flag to avoid a constant loop of quiting and loading. This won't
run from workbench, or execute a command unless modified.
*/
a=arg(1)
if a="STACK" then signal stack_set
/* This is backwards due to the FILO format of the CON/shell */
push "rx "||progname||" STACK"
push "stack 30000"
exit
stack_set:
say ""
/* Setup the directory and HTML file */
if exists(location)=0 then address command "c:makedir >NIL: "||substr(location,1,length(location)-1)
address command "c:copy "||index||" "||location||" >NIL:"
main:
if exists("ram:stopcam")=1 then exit
if log=1 then say time()||" "||date()||" Digitizing"
/* Tell IV24CP via ARexx to digitize */
address REXX_IV24CP
IV24CP_FILE "ram:temp"
IV24CP_RGB EXTERN
IV24CP_FREEZE ON
IV24CP_DIGITIZE
IV24CP_FREEZE OFF
IV24CP_RGB AMIGA
if log=1 then say time()||" "||date()||" Converting"
/*
This converts the image to a temp file, and when it is completed converting,
deletes the old web cam image, and renames the new one.
*/
address command imagecon||" >NIL: "||temp||"temp.0001 TO "||location||"cam_temp.gif "||imagearg
address command "c:delete "||location||"cam.gif >NIL:"
address command "c:rename "||location||"cam_temp.gif "||location||"cam.gif >NIL:"
address command "c:delete "||temp||"temp.next >NIL:"
if log=1 then say time()||" "||date()||" Picture online"
address command "c:wait "||time
signal main
BREAK_C:
say "*** Control C detected -- Stopping webcam"
exit